#include <move.h>


int same_move(move_t a, move_t b)
{
  if (MOVE_FROM(a) != MOVE_FROM(b))
    return 0;

  if (MOVE_TO(a) != MOVE_TO(b))
    return 0;

  int pa = MOVE_PROMOTION(a);
  if (pa == NO_PROMOTION)
    pa = QUEEN;
  int pb = MOVE_PROMOTION(b);
  if (pb == NO_PROMOTION)
    pb = QUEEN;

  return (pa == pb);
}
